package com.moodincode.taskcenter;

import org.quartz.CronExpression;

import java.text.ParseException;
import java.util.Date;

public class TestCron {
    public static void main(String[] args) throws ParseException {
        CronExpression cronExpression=new CronExpression("0 0 5-15 * * ?");
        Date timeAfter = cronExpression.getNextValidTimeAfter(new Date());
        System.out.println(timeAfter);
        timeAfter = cronExpression.getNextValidTimeAfter(timeAfter);
        System.out.println(timeAfter);
    }
}
